package com.service.impl;

import com.mapper.AddressMapper;
import com.pojo.Address;
import com.service.AddressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class AddressServiceImpl implements AddressService {
    @Autowired
    private AddressMapper addressMapper;
    @Override
    public List<Address> selectByuserId(long userId) {
        return addressMapper.selectByuserId(userId);
    }

    @Override
    public int insert(Address address) {
        return addressMapper.insert(address);
    }

    @Override
    public Address selectAddressById(long id) {
        return addressMapper.selectAddressById(id);
    }
}
